package com.yl.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.yl.model.Goods;
import com.yl.service.IGoodsService;


@Controller
@RequestMapping("/Goods")
public class MallGoodsController {
	
	@Resource
	private IGoodsService goodsService;
	
	//查询今日必抢
	@RequestMapping("/findToday.do")
	@ResponseBody
	public List<Goods> findToday(){
		return goodsService.findToday();
	}
	
	//后台查看商品详情
	@RequestMapping("/findById.do")
	@ResponseBody
	public Goods findById(int goods_id) {
		return goodsService.findById(goods_id);
	}
}
